def make_chocolate(small, big, goal):
  a=goal//5
  b=min(a,big)
  c=goal-b*5
  if c<=small:
    return c
  else:
    return -1
